package za.ac.wits.elen4010.capturetheflag;

import java.util.Timer;
import java.util.TimerTask;

import za.ac.wits.elen4010.capturetheflag.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Splash extends Activity
{
	
	private Timer timer;
	
	 public void onCreate(Bundle savedInstanceState) 
	    {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.splash);
	        
	        timer = new Timer();
	        timer.schedule(new ReturnTask(), 15*1000);
	       	        
	    }
	 
	 class ReturnTask extends TimerTask {
	        public void run() {
	            Intent intent = new Intent();
	            setResult(RESULT_OK, intent);
	            finish();
	            timer.cancel(); //Terminate the timer thread
	        }
	    }
	
}
